home *** CD-ROM | disk | FTP | other *** search
/ The Genius of Edison / The Genius of Edison (Version 1.0)(Softkey Multimedia)(GOE744AE-CD)(1996).ISO / pc / data / shared.cst / 00064_Script_PRINTING -- PC SPECIFIC < prev    next >
Text File  |  1996-09-03  |  3KB  |  113 lines

  1. -- --------------------------------------------------------------------------------------
  2. -- Handler printScreenPC prints a screenShot of the current 13" screen
  3. -- (640 wide by 480 tall), scaled up to fit an 11 x 8.5 inch page...
  4. -- (not recommended for monitors/windows smaller than 640 x 480 at this time):
  5.  
  6. on printScreenPC
  7.   printFullSizePC
  8. end
  9.  
  10. -----------------------------------------------------------------------
  11. -- Handler printFullSizePC is called by printScreenPC to print the screen
  12. -- full size and by printFilePC to print a file full size.
  13.  
  14. on printFullSizePC fullFileName
  15.   -- 1) open the xobject
  16.   openXObjHandler "pmatic.dll"
  17.   
  18.   -- 2) create a new object
  19.   set printObj = printomatic(mnew)
  20.   
  21.   if not(objectP( printObj )) then
  22.     alert "Sorry...Error in printing."
  23.     exit
  24.   end if
  25.   
  26.   -- 3) call the print function to print
  27.   doPrintFullScreen(printObj, fullFileName)
  28.   
  29.   -- 4) close the xojbect
  30.   closeXObjHandler "pmatic.dll"
  31. end
  32.  
  33. -- --------------------------------------------------------------------------------------
  34. -- Handler printFilePC 
  35.  
  36. on printFilePC fullFileName
  37.   printFullSizePC(fullFileName)
  38. end
  39.  
  40. -- ----------------------------------------------------------------
  41. -- Handler printHelpDatabasePC is called when the user clicks the print
  42. -- button in the database. It prints the text or picture (whichever
  43. -- is currently displayed) of the currently selected topic.
  44.  
  45. on printHelpDatabasePC
  46.   global topicProperty
  47.   
  48.   -- 1) open the xobject
  49.   openXObjHandler "pmatic.dll"
  50.   
  51.   -- 2) create a new object
  52.   set printObj = printomatic(mnew)
  53.   
  54.   if not(objectP( printObj )) then
  55.     alert "Sorry...Error in printing."
  56.     exit
  57.   end if
  58.   
  59.   -- 3) call the print function to print
  60.   if (topicProperty = "text") then
  61.     doPrintHelpDatabaseText(printObj)
  62.   else if (topicProperty = "media") then
  63.     doPrintHelpDatabasePicture(printObj)
  64.   end if
  65.   
  66.   -- 4) close the xojbect
  67.   closeXObjHandler "pmatic.dll"
  68. end
  69.  
  70. -- -----------------------------------------------------------
  71. -- Handler printCastPC  
  72.  
  73. on printCastPC whichCast, title, caption
  74.   -- 1) open the xobject
  75.   openXObjHandler "pmatic.dll"
  76.   
  77.   -- 2) create a new object
  78.   set printObj = printomatic(mnew)
  79.   
  80.   if not(objectP( printObj )) then
  81.     alert "Sorry...Error in printing."
  82.     exit
  83.   end if
  84.   
  85.   -- 3) call the print function to print
  86.   doPrintCast(printObj, whichCast, title, caption) 
  87.   
  88.   -- 4) close the xojbect
  89.   closeXObjHandler "pmatic.dll"
  90. end
  91.  
  92.  
  93. -- -----------------------------------------------------------
  94. -- Handler printMorsePC  
  95.  
  96. on printMorsePC theMorse , theText
  97.     -- 1) open the xobject
  98.   openXObjHandler "pmatic.dll"
  99.   
  100.   -- 2) create a new object
  101.   set printObj = printomatic(mnew)
  102.   
  103.   if not(objectP( printObj )) then
  104.     alert "Sorry...Error in printing."
  105.     exit
  106.   end if
  107.   
  108.   -- 3) call the print function to print
  109.   doPrintMorse(printObj , theMorse, theText) 
  110.   
  111.   -- 4) close the xojbect
  112.   closeXObjHandler "pmatic.dll"
  113. end